#pragma once
#include <opencv2/core/core.hpp>
#include ".\dynamicwindow\cdxcdynamicpropsheet.h"
#include "dxflib/dl_dxf.h"
#include "dxflib/dl_creationadapter.h"
#include "DxfLineVector.h"
#include "DxfEditorPropPage.h"
#include "DxfZeroAdjustPropPage.h"
#include "DxfDrillOrderPropPage.h"
#include "DxfCutterPropPage.h"
#include "DxfSimPropPage.h"
#include "MachiningHole.h"

class CDxfPropSheet :
    public CPropertySheet, public DL_CreationAdapter
{
public:
    CDxfPropSheet(CWnd* pWndParent = NULL);
    ~CDxfPropSheet(void);

    virtual BOOL OnInitDialog();

    virtual void addLine( const DL_LineData& );

    DxfImage& DxfLines() { return m_vLines; }

    std::vector<CMachiningHole>& Drillings() { return m_vDrills; }

    void SetPageTitle(int nPage, LPTSTR pszText);
private:
    DxfImage m_vLines;
    std::vector<CMachiningHole> m_vDrills;
    CStatic            m_lblVertexOffset;
    CEdit              m_edtVertexOffset;
    double             m_dVertexOffset;
    
    CDxfEditorPropPage m_dxfEditPropPage;;
    CDxfZeroAdjustPropPage m_dxfZeroPropPage;
    CDxfDrillOrderPropPage m_dxfOrderPropPage;
    CDxfCutterPropPage m_dxfCutterPropPage;
    CDxfSimPropPage m_dxfSimPropPage;

public:
    DECLARE_MESSAGE_MAP()
    afx_msg void OnSize(UINT nType, int cx, int cy);
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
protected:
    virtual void DoDataExchange(CDataExchange* pDX);
    virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
};
